package com.hsd.controller;

import com.hsd.service.IFloorService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("/api/index/floor")
public class FloorController extends BaseController{

    @Resource
    private IFloorService floorService;

    /**
     * 初始化index页面楼层信息
     * @param floors
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/fs/{floors}",method = RequestMethod.GET)
    public Map<String,Object> findAllFloor(@PathVariable Integer floors){
        return response(floorService.findFloors(floors));
    }
}
